//
//  XGUserDetailModel.swift
//  TodayNews
//
//  Created by monkey on 2020/2/12.
//  Copyright © 2020 itcast. All rights reserved.
//

import HandyJSON

struct XGUserDetailModel: HandyJSON
{
    /// 名称
    var name: String?
    /// 认证内容
    var verified_content: String?
    /// 简介
    var description: String?
    /// 用户id
    var user_id: UInt64 = 0
    /// 是否认证
    var user_verified: Bool = false
    /// 用户头像
    var avatar_url: String?
    /// 粉丝数
    var followers_count: Int = 0
    /// 关注数
    var followings_count: Int = 0
    /// 地区
    var area: String?
    /// 是否关注
    var is_following: Bool = false
    /// 顶部菜单
    var top_tab: [XGTopTab]?
    /// 底部菜单
    var bottom_tab: [XGBottomTab]?
}

struct XGTopTab: HandyJSON
{
    /// 名称
    var show_name: String?
    /// 类型
    var type: XGTopTabType = .dongtai
    /// 接口地址
    var url: String?
}

struct XGBottomTab: HandyJSON
{
    /// 名称
    var name: String?
    /// 值
    var value: String?
    /// 类型
    var type: String?
    /// 子选项
    var children: [XGBottomTabChild]?
}

struct XGBottomTabChild: HandyJSON
{
    /// 名称
    var name: String?
    /// 值
    var value: String?
    /// 类型
    var type: String?
}

enum XGTopTabType: String, HandyJSONEnum
{
    /// 动态
    case dongtai = "dongtai"
    /// 文章
    case article = "all"
    /// 视频
    case video = "video"
    /// 问答
    case wenda = "wenda"
    /// 小视频
    case iesVideo = "ies_video"
    /// 专栏
    case column = "column"
}
